#!/usr/bin/env python3
# -*- coding:utf-8 -*-
for j in range(5):
    for i in range(10):
        if i < 5:
            continue
        if i > 8:
            break
        print(i)